package com.bharat.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "TEST_RECORDS")
public class TestRecord {
	
	private Long testRecordId;
	private String testComments;
	private Double amountPaid;
	private Double amountBalance;
	private Date createdDate;
	private Date updatedDate;

	private Patient patient;
	
	public TestRecord() {
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "TEST_RECORD_ID")
	public Long getTestRecordId() {
		return testRecordId;
	}

	public void setTestRecordId(Long testRecordId) {
		this.testRecordId = testRecordId;
	}

	@Column(name = "TEST_COMMENTS")
	public String getTestComments() {
		return testComments;
	}

	public void setTestComments(String testComments) {
		this.testComments = testComments;
	}

	@Column(name = "AMOUNT_PAID")
	public Double getAmountPaid() {
		return amountPaid;
	}

	public void setAmountPaid(Double amountPaid) {
		this.amountPaid = amountPaid;
	}

	@Column(name = "AMOUNT_BALANCE")
	public Double getAmountBalance() {
		return amountBalance;
	}

	public void setAmountBalance(Double amountBalance) {
		this.amountBalance = amountBalance;
	}

	@Temporal(value = TemporalType.TIMESTAMP)
	@Column(name = "CREATED_DATE")
	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	@Temporal(value = TemporalType.TIMESTAMP)
	@Column(name = "UPDATED_DATE")
	public Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate) {
		this.updatedDate = updatedDate;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PATIENT_ID", nullable = false)
	public Patient getPatient() {
		return patient;
	}
	
	public void setPatient(Patient patient) {
		this.patient = patient;
	}
}
